package br.unicamp.ic.sgct.server.dominio.servicos;

import java.text.SimpleDateFormat;
import java.util.Date;

import br.unicamp.ic.sgct.client.aplicacao.ucs.UtilsService;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class UtilsServiceImpl extends RemoteServiceServlet implements
		UtilsService {
	private static SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");

	/**
	 * @see br.unicamp.ic.sgct.client.aplicacao.ucs.UtilsService#formatarData(java.util.Date)
	 */
	public String formatarData(Date data) throws Exception {
		if (data != null)
			return sdf.format(data);
		return "";
	}
}